package com.tepth.busfix.main.repair.complete;

import com.tepth.busfix.network.ApiModel;
import com.tepth.busfix.network.Network;

import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;

/**
 * Created by TMVPHelper on 2017/03/15
 */
public class CompletePunchCardModel implements CompletePunchCardContract.Model {

    @Override
    public Observable<ApiModel<String>> postRepair(String authKey, String info) {
        return Network.getApiService().startRepair(authKey, info)
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread());
    }

    @Override
    public Observable<ApiModel<String>> postRework(String authKey, String info) {
        return Network.getApiService().rework(authKey, info)
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread());
    }

}